/* ================================================================
   NEWS PAGE – Clean & Modern Redesign
   Professional, User-Friendly with Strategic Hierarchy
================================================================ */

:root {
  --news-accent: #8B1A1A;
  --news-accent-light: rgba(139, 26, 26, 0.08);
  --news-bg: #FAFAF8;
  --news-card: #FFFFFF;
  --news-text: #1A1A1A;
  --news-text-light: #666666;
  --news-border: #E8E6E0;
  --news-radius: 14px;
  --news-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  --news-shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.08);
}

body.dark-mode {
  --news-bg: #0E0A0A;
  --news-card: #161111;
  --news-text: #F5F0EE;
  --news-text-light: #9A918D;
  --news-border: #2E2020;
  --news-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  --news-shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.3);
}

/* ================================================================
   PAGE HERO (Consistent with other subpages)
================================================================ */

.ims-hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 0;
  overflow: hidden;
  background: #000;
}

.ims-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ims-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 10s ease;
  opacity: 0.6;
}

.ims-hero.loaded .ims-hero-img {
  transform: scale(1);
}

.ims-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
          rgba(0, 0, 0, 0.96) 0%,
          rgba(0, 0, 0, 0.65) 40%,
          rgba(0, 0, 0, 0.25) 100%);
  z-index: 1;
}

.ims-hero-overlay::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to top, rgba(10, 3, 3, 1) 0%, rgba(10, 3, 3, 0.4) 55%, transparent 100%);
  z-index: 2;
}

.ims-hero-content {
  position: relative;
  z-index: 10;
  padding: 60px 0 50px;
  width: 100%;
}

.ims-hero-content .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ims-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 22px;
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(16px);
  animation: newsFadeUp 0.75s cubic-bezier(0.23, 1, 0.32, 1) 0.2s forwards;
}

.ims-hero-label i {
  font-size: 12px;
  color: #f87171;
}

.ims-hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(30px);
  animation: newsFadeUp 0.85s cubic-bezier(0.23, 1, 0.32, 1) 0.38s forwards;
}

.ims-hero-content p {
  font-size: clamp(0.97rem, 2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.72);
  max-width: 520px;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(16px);
  animation: newsFadeUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.55s forwards;
  font-family: 'Inter', sans-serif;
}

@keyframes newsFadeUp {
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* ================================================================
   NEWS FILTERS (Top Bar)
================================================================ */

.news-filters {
  padding: 40px 0 20px;
  background: var(--news-bg);
  position: sticky;
  top: 64px; /* Matches the header height */
  z-index: 100;
  border-bottom: 1px solid var(--news-border);
  margin-bottom: 40px;
}

.filter-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 5px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-wrapper::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  white-space: nowrap;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  background: var(--news-card);
  color: var(--news-text-light);
  border: 1px solid var(--news-border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--news-accent);
  color: var(--news-accent);
}

.filter-btn.active {
  background: var(--news-accent);
  color: #fff;
  border-color: var(--news-accent);
  box-shadow: 0 4px 12px rgba(139, 26, 26, 0.3);
}

/* ================================================================
   NEWS GRID & CARDS
================================================================ */

.news-section {
  padding: 0 0 100px;
  background: var(--news-bg);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* Featured Card (Top) */
.featured-news {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  background: var(--news-card);
  border-radius: var(--news-radius);
  padding: 40px;
  margin-bottom: 40px;
  border: 1px solid var(--news-border);
  box-shadow: var(--news-shadow);
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-news:hover {
  transform: translateY(-5px);
  box-shadow: var(--news-shadow-hover);
}

.featured-img-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
}

.featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.featured-news:hover .featured-img-wrap img {
  transform: scale(1.04);
}

.featured-info {
  display: flex;
  flex-direction: column;
}

.news-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--news-accent);
  margin-bottom: 14px;
  display: block;
}

.featured-info h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--news-text);
  line-height: 1.2;
  margin-bottom: 20px;
}

.featured-info p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--news-text-light);
  margin-bottom: 24px;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--news-text-light);
  margin-top: auto;
}

/* Regular News Cards */
.news-card {
  background: var(--news-card);
  border-radius: var(--news-radius);
  overflow: hidden;
  border: 1px solid var(--news-border);
  box-shadow: var(--news-shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--news-shadow-hover);
  border-color: var(--news-accent);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .card-img-wrap img {
  transform: scale(1.08);
}

.card-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--news-text);
  line-height: 1.4;
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

.news-card:hover h3 {
  color: var(--news-accent);
}

.card-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--news-text-light);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Filter Animation */
.news-item {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.news-item.hidden {
  display: none;
}

.news-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.news-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.load-more-wrap {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.load-more-wrap.hidden {
    display: none;
}

/* ================================================================
   RESPONSIVE
================================================================ */

@media (max-width: 1100px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .featured-news {
    grid-template-columns: 1fr;
    padding: 30px;
    gap: 24px;
  }
  
  .featured-info h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 680px) {
  .ims-hero {
    height: 70vh;
    min-height: 480px;
  }
}

@media (max-width: 480px) {
  .ims-hero {
    height: 65vh;
    min-height: 420px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .news-filters {
    padding: 24px 0 16px;
  }

  .filter-btn {
    padding: 8px 18px;
    font-size: 13px;
  }
}